package cn.ddiancan.auth.sms.controller;

import cn.ddiancan.auth.sms.service.XddcloudServerMobileService;
import cn.ddiancan.xddcloud.common.entity.CommonResult;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/mobile")
@Tag(name = "发送手机短信", description = "发送手机短信")
public class XddcloudMobileController {

    @Autowired
    private XddcloudServerMobileService xddcloudPscMobileService;

    @GetMapping("/login/send/{phoneNumber}")
    public CommonResult<?> sendLoginCode(@PathVariable(name = "phoneNumber") String phoneNumber) {
        return xddcloudPscMobileService.sendSms(phoneNumber);
    }

}
